package Menus
{
	import flash.display.Bitmap;
	import flash.display.MovieClip;
	import flash.text.TextField;
	
	public class BaseMenu extends MovieClip
	{
		protected var game:Game;
		protected var bitmap:Bitmap;
		
		protected var testOutput:TextField = new TextField();
		protected var menuChoice:uint = 0;
		protected var maxChoices:uint = 0;
		
		public function BaseMenu(game:Game, bitmap:Bitmap)
		{
			super();
			this.bitmap = bitmap;
			this.game = game;
			this.addChild(bitmap);
		}
		
		public function Update(deltaTime:int):void
		{
			
		}
		
		public function HandleInput(keyCode:uint):void
		{
			
		}
		
		public function Unload():void
		{
			Remove();
		}
		
		private function Remove():void
		{
			if(game.TopClass.contains(this))
			{
				game.TopClass.removeChild(this);
			}
		}
		
		public function Load():void
		{
			game.TopClass.addChild(this);
		}
		
		public function Show():void
		{
			this.visible = true;
		}
		
		public function Hide():void
		{
			this.visible = false;
		}
		
		public function set MenuChoice(newValue:uint):void
		{
			menuChoice = newValue;
			menuChoiceChanged();
		}
		public function get MenuChoice():uint
		{
			return menuChoice;
		}
		
		protected function menuChoiceChanged():void
		{
		}
		
		public function Destroy():void
		{
			game = null;
			bitmap = null;
		}
	}
}